﻿#ifndef MONTORPROCESS_H
#define MONTORPROCESS_H

#include <QObject>
#include <QWidget>
#include <QProcess>
#include <QTimer>

class MontorProcess : public QObject
{
    Q_OBJECT
public:
    explicit MontorProcess(QObject *parent = nullptr);
    virtual ~MontorProcess();

    static MontorProcess * gestance();
    void setStartCompany(bool status);
    bool getStartCompany();

    bool checkAppStatus(const QString &appName);

    QString readFlile();
    void killProcess(const QString &processName);

signals:


public slots:
    void onTestTimeout();

private:

    static MontorProcess * m_montorProcess;

    QTimer * m_timer;
    QString m_updateSourcePahts;
    int m_timeLens;
};

#endif // MONTORPROCESS_H
